You can force delete a BGP peer-group to delete the associated dynamic peers.
(efa:root)root@node-2:~# efa tenant service bgp peer-group show =============================================================================================== Name : ten1bgppg1 Tenant : ten1 State : bgp-pg-created +--------------+------+-------+---------+---------+--------+-------------------------+-----------+------------+ | Device IP | Peer | Remote| Next Hop| Update | BFD | BFD | Dev State | App State | | | Group| ASN | Self |Source IP| Enabled| [Interval,Rx,Multiplier]| | | +--------------+------+-------+---------+---------+--------+-------------------------+-----------+------------+ | 10.20.246.16 | pg1 | 65002 | false | | false | |provisioned| cfg-in-sync| +--------------+------+-------+---------+---------+--------+-------------------------+-----------+------------+ | 10.20.246.15 | pg1 | 65002 | false | | false | |provisioned| cfg-in-sync| +--------------+------+-------+---------+---------+--------+-------------------------+-----------+------------+ BGP PeerGroup Details ================================================================================================= (efa:root)root@node-2:~# efa tenant service bgp peer show ================================================================================================= Name : ten1bgppeer1 Tenant : ten1 State : bgp-peer-created +------+---+---+-----+-------+-------+----------+---------+--------+-------------------------+-----+-----+ |Device|VRF|AFI| SAFI| Remote| Remote| Next Hop |Update | BFD | BFD |Dev |App | |IP | | | | IP | ASN | Self |Source IP| Enabled| [Interval,Rx,Multiplier]|State|State| +------+---+---+-----+-------+-------+----------+---------+--------+-------------------------+-----+-----+ Static Peer Details +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ | Device-IP | VRF | AFI | SAFI | Listen Range | Listen| Peer | Dev State | App State | | | | | | | Limit | Group| | | +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ | 10.20.246.15 | ten1vrf1 | ipv4 | unicast| 10.20.30.0/23 | 100 | pg1 | provisioned| cfg-in-sync | +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ | 10.20.246.15 | ten1vrf1 | ipv4 | unicast| 10.20.40.0/23 | 100 | pg1 | provisioned| cfg-in-sync | +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ | 10.20.246.15 | ten1vrf1 | ipv6 | unicast| 10::/126 | 100 | pg1 | provisioned| cfg-in-sync | +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ | 10.20.246.15 | ten1vrf1 | ipv6 | unicast| 20::/126 | 100 | pg1 | provisioned| cfg-in-sync | +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ | 10.20.246.16 | ten1vrf1 | ipv6 | unicast| 10::/126 | 100 | pg1 | provisioned| cfg-in-sync | +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ | 10.20.246.16 | ten1vrf1 | ipv6 | unicast| 20::/126 | 100 | pg1 | provisioned| cfg-in-sync | +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ | 10.20.246.16 | ten1vrf1 | ipv4 | unicast| 10.20.30.0/23 | 100 | pg1 | provisioned| cfg-in-sync | +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ | 10.20.246.16 | ten1vrf1 | ipv4 | unicast| 10.20.40.0/23 | 100 | pg1 | provisioned| cfg-in-sync | +--------------+----------+------+--------+---------------+-------+------+------------+-------------+ Dynamic Peer Details ==================================================================================================
Rack1-Device1# show running-config router bgp router bgp local-as 4200000000 capability as4-enable fast-external-fallover neighbor pg1 peer-group neighbor pg1 remote-as 65002 neighbor 10.20.20.6 remote-as 4200000000 neighbor 10.20.20.6 next-hop-self address-family ipv4 unicast network 172.31.254.153/32 network 172.31.254.238/32 maximum-paths 8 graceful-restart ! address-family ipv4 unicast vrf ten1vrf1 redistribute connected listen-range 10.20.30.0/23 peer-group pg1 limit 100 listen-range 10.20.40.0/23 peer-group pg1 limit 100 maximum-paths 8 ! address-family ipv6 unicast ! address-family ipv6 unicast vrf ten1vrf1 redistribute connected listen-range 10::/126 peer-group pg1 limit 100 listen-range 20::/126 peer-group pg1 limit 100 maximum-paths 8 ! address-family l2vpn evpn graceful-restart ! ! |
Rack1-Device2# show running-config router bgp router bgp local-as 4200000000 capability as4-enable fast-external-fallover neighbor pg1 peer-group neighbor pg1 remote-as 65002 neighbor 10.20.20.7 remote-as 4200000000 neighbor 10.20.20.7 next-hop-self address-family ipv4 unicast network 172.31.254.157/32 network 172.31.254.238/32 maximum-paths 8 graceful-restart ! address-family ipv4 unicast vrf ten1vrf1 redistribute connected listen-range 10.20.30.0/23 peer-group pg1 limit 100 listen-range 10.20.40.0/23 peer-group pg1 limit 100 maximum-paths 8 ! address-family ipv6 unicast ! address-family ipv6 unicast vrf ten1vrf1 redistribute connected listen-range 10::/126 peer-group pg1 limit 100 listen-range 20::/126 peer-group pg1 limit 100 maximum-paths 8 ! address-family l2vpn evpn graceful-restart ! ! |
force
option.(efa:root)root@node-2:~# efa tenant service bgp peer-group delete --name ten1bgppg1 --tenant ten1 BgpService deletion Failed: Error : PeerGroup pg1 has dynamic Neighbor 10.20.30.0/23 configured on Device 10.20.246.16 (efa:root)root@node-2:~# efa tenant service bgp peer-group delete --name ten1bgppg1 --tenant ten1 –force Bgp service peer-group delete with "force" option will delete the device configuration corresponding to the bgp and also deletes the bgp record from the application. Do you want to proceed (Y/N): Y BgpService deleted successfully. (efa:root)root@node-2:~# efa tenant service bgp peer-group show --- Time Elapsed: 192.345588ms --- (efa:root)root@node-2:~# efa tenant service bgp peer show ============================================================================== Name : ten1bgppeer1 Tenant : ten1 State : bgp-peer-created +-------+----+-----+-----+-------+-------+----------+-----------+---------+--------------------------+------+------+ | Device| VRF| AFI | SAFI| Remote| Remote| Next Hop | Update | BFD | BFD | Dev | App | | IP | | | | IP | ASN | Self | Source IP | Enabled | [Interval,Rx,Multiplier] | State| State| +-------+----+-----+-----+-------+-------+----------+-----------+---------+--------------------------+------+------+ Static Peer Details +-----------+-----+-----+------+--------+--------+------+------+------+ | Device-IP | VRF | AFI | SAFI | Listen | Listen | Peer | Dev | App | | | | | | Range | Limit | Group| State| State| +-----------+-----+-----+------+--------+--------+------+------+------+ Dynamic Peer Details ================================================================================
Rack1-Device1# show running-config router bgp router bgp local-as 4200000000 capability as4-enable fast-external-fallover neighbor 10.20.20.6 remote-as 4200000000 neighbor 10.20.20.6 next-hop-self address-family ipv4 unicast network 172.31.254.153/32 network 172.31.254.238/32 maximum-paths 8 graceful-restart ! address-family ipv4 unicast vrf ten1vrf1 redistribute connected maximum-paths 8 ! address-family ipv6 unicast ! address-family ipv6 unicast vrf ten1vrf1 redistribute connected maximum-paths 8 ! address-family l2vpn evpn graceful-restart ! ! |
Rack1-Device2# show running-config router bgp router bgp local-as 4200000000 capability as4-enable fast-external-fallover neighbor 10.20.20.7 remote-as 4200000000 neighbor 10.20.20.7 next-hop-self address-family ipv4 unicast network 172.31.254.157/32 network 172.31.254.238/32 maximum-paths 8 graceful-restart ! address-family ipv4 unicast vrf ten1vrf1 redistribute connected maximum-paths 8 ! address-family ipv6 unicast ! address-family ipv6 unicast vrf ten1vrf1 redistribute connected maximum-paths 8 ! address-family l2vpn evpn graceful-restart ! ! |